From: Ian Off Date: Thu, 21 Aug 2025 04:27:43 +0000 (-0500) Subject: screenshot: End screencast with same keybinding as start screencast X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~44^2~51 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=905fe781d17cb2e7405fd341b5ae1eba9c318596;p=gnome-shell.git screenshot: End screencast with same keybinding as start screencast Currently, the screencast keyboard shortcut shows the UI to begin a screencast, but there is no way to end it with a keyboard shortcut. This behavior is inconvenient and seems to be a regression, as a wide variety of online resources recommend using the same shortcut to start and end screencasts. This commit introduces a simple check when the showScreenRecordingUI function is called by the show-screen-recording-ui keybinding. If the showScreenRecordingUI function is called while a screencast is in progress, the stopScreencast function is called instead of opening the screenshot UI in screencast mode. Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5386 Part-of: --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 2e6b2cf4f..60dedd68b 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -1428,7 +1428,12 @@ export const ScreenshotUI = GObject.registerClass({ new Gio.Settings({schema_id: 'org.gnome.shell.keybindings'}), Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, restrictedModes, - showScreenRecordingUI + () => { + if (this._screencastInProgress) + this.stopScreencast(); + else + showScreenRecordingUI(); + } ); Main.wm.addKeybinding(